package com.myspace.backend.controller.user;

import com.myspace.backend.service.user.UserPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class UserPostController {

    @Autowired
    private UserPostService userPostService;

    @GetMapping("/myspace/user/userpost/")
    public List<Map<String, String>> getUserpost(@RequestParam Map<String, String> map) {
        String userId = map.get("user_id");
        return userPostService.getUserpost(userId);
    }

}
